﻿#include <algorithm>
#include <gtest/gtest.h>
#include <iostream>
#include <vector>

#define MEMSPY_IMPLEMENTATION

// #include <spdlog/spdlog.h>
#include <xy/geom/bspline_curve.h>
#include <xy/geom/bspline_surface.h>
#include <xy/utils/memspy.h>
#include <xy/utils/scope_profiler.h>

using namespace std;
using namespace xy;
using namespace xy::geom;

TEST(TestSort, A)
{
    {
        std::vector<vec3> cpts0{{vec3{0.0, 0.0, 0.0}, vec3{1.0, 0.0, 0.0}, vec3{0.0, 1.0, 0.0}, vec3{0.0, 0.0, 1.0}}};
        bspline_curve<3> curve(std::move(cpts0), {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0}, 3);
    }

    {
        std::vector<vec3> cpts{
            vec3{0.0, 0.0, 0.0}, vec3{1.0, 0.0, 0.0}, vec3{0.0, 1.0, 0.0}, vec3{0.0, 0.0, 1.0},
            vec3{0.0, 0.0, 0.0}, vec3{1.0, 0.0, 0.0}, vec3{0.0, 1.0, 0.0}, vec3{0.0, 0.0, 1.0},
            vec3{0.0, 0.0, 0.0}, vec3{1.0, 0.0, 0.0}, vec3{0.0, 1.0, 0.0}, vec3{0.0, 0.0, 1.0},
        };
        bspline_surface<3> surface(std::move(cpts), {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0},
                                   {0.0, 1.0, 2.0, 3.0, 4.0, 5.0}, 3, 2);
    }

    // {
    //     spdlog::set_level(spdlog::level::debug);
    //     spdlog::debug("This is a debug message from spdlog");
    // }
}